/*
 * @Author: HuangYue
 * @Date: 2022-02-27 14:57:19
 * @LastEditors: HuangYue
 * @LastEditTime: 2022-05-06 17:32:04
 * @FilePath: /graduation/src/services/mockApi/deviceManage.js
 * @Description:设备信息api
 */
import { request } from 'umi';

/**
 * 获取所有设备
 */
export async function getAllDevice() {
  return request('/api/getAllDevice');
}
/**
 * 删除指定设备
 */
export async function deleteDeviceByDid(parmas, options) {
  return request('/api/deleteDeviceByDid', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: parmas,
    ...(options || {}),
  });
}
/**
 * 更新指定设备
 */
export async function updateDevice(parmas, options) {
  return request('/api/updateDevice', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: parmas,
    ...(options || {}),
  });
}
/**
 * 添加指定设备
 */
export async function addDevice(parmas, options) {
  return request('/api/addDevice', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: parmas,
    ...(options || {}),
  });
}
